Skip to content

Conversation

Pippadi
Copy link

@Pippadi Pippadi commented May 3, 2022

strconv.Atoi returns an int, which isn't guaranteed to be 64-bit on all platforms. To prevent ints from overflowing on 32-bit platforms when setting int64 fields, strconv.ParseInt is used instead.

@hinshun
Copy link
Contributor

hinshun commented May 3, 2022

Thanks @Pippadi, can we add a test of some sort?

@Pippadi
Copy link
Author

Pippadi commented May 4, 2022

Just added to TestUnmarshal. Passes with GOARCH=386 go test.
Is this what you were looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants